/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.gwc.yy.liuxue.entity;

import com.thinkgem.jeesite.modules.sys.entity.User;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 提醒Entity
 * @author 黎俊涛
 * @version 2017-04-13
 */
public class Remind extends DataEntity<Remind> {
	
	private static final long serialVersionUID = 1L;
	private User user;		// 用户
	private String content;		// 内容
	private String remindType;		// 提醒类型
	private Date remindTime;		// 时间
	private String [] student_id;
	private List<User> students = new ArrayList<>();
	
	public Remind() {
		super();
	}

	public Remind(String id){
		super(id);
	}

	@NotNull(message="用户不能为空")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=500, message="内容长度必须介于 0 和 500 之间")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@Length(min=0, max=50, message="提醒类型长度必须介于 0 和 50 之间")
	public String getRemindType() {
		return remindType;
	}

	public void setRemindType(String remindType) {
		this.remindType = remindType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getRemindTime() {
		return remindTime;
	}

	public void setRemindTime(Date remindTime) {
		this.remindTime = remindTime;
	}

	public List<User> getStudents() {
		return students;
	}

	public void setStudents(List<User> students) {
		this.students = students;
	}

	public String[] getStudent_id() {
		return student_id;
	}

	public void setStudent_id(String[] student_id) {
		this.student_id = student_id;
	}

	@Override
	public String toString() {
		return "Remind [user=" + user + ", content=" + content + ", remindType=" + remindType + ", remindTime="
				+ remindTime + ", student_id=" + Arrays.toString(student_id) + ", students=" + students + "]";
	}
	
	
	
}